﻿using LimaLims.Application.Service.Base.Dto;
using LimaLims.Core;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LimaLims.Application.Service.Sys.Dto
{
    public class DictTypeInput
    { }
    public class DictTypePageInput : PageInputBase
    {
        public string Name { get; set; }
        public string Code { get; set; }
    }
    public class AddDictTypeInput : BaseDto
    {
        public string Name { get; set; }
        public string Code { get; set; }
        public int Sort { get; set; }
        public string Remark { get; set; }
    }
    public class UpdateDictTypeInput : AddDictTypeInput
    {}

    public class DictTreeOutput
    {
        /// <summary>
        /// Id
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 父Id
        /// </summary>
        public long Pid { get; set; }

        /// <summary>
        /// 编码-对应字典值的编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 名称-对应字典值的value
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 子节点集合
        /// </summary>
        public List<DictTreeOutput> Children { get; set; } = new List<DictTreeOutput>();
    }

}
